-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Amino non len prefixed default #2234
Conversation
…len_prefixed_default # Conflicts: # baseapp/baseapp.go # baseapp/baseapp_test.go # client/context/helpers.go # client/tx/query.go # types/rational_test.go # x/auth/client/cli/account.go # x/gov/client/cli/tx.go # x/gov/client/rest/rest.go # x/gov/handler.go # x/slashing/client/rest/query.go # x/stake/keeper/validator.go
I feel like almost all of these don't need to be length prefixed. (I didn't look super deeply into it, but I think all of them don't need to be length prefixed?) Also I think tendermint will need a PR to upgrade it as well, since tendermint will share the same dependency due to dep overrides. |
ad4e872
to
011f9a1
Compare
I agree @ValarDragon! Most cases won't need length encoding. I think it is good to make this more explicit that people scratch their head first to see if they actually need length prefixed encoding or not. I discussed with Jae, and we will upgrade in two steps. See comment inhttps://github.com/tendermint/go-amino/pull/222 |
And I'll create a PR out of https://github.com/tendermint/tendermint/compare/develop...amino_explicit_len_prefix?expand=1 |
Sounds like a good idea. Do you think we should convert things from length prefixed to not length prefixed in this PR or a separate PR? If its a separate PR, this seems good to merge imo, as soon as we update tendermint. Looking through this, the only place where length prefixing may be necessary (imo) is iavlstore stuff. |
Yeah, I think this should be done in a separate PR after this gets merged. I wouldn't be surprised if length prefixing isn't necessary in most places though. |
@liamsi What's the status on this - looks like the upstream change is still pending, is that blocked on anything? |
…_non_len_prefixed_default # Conflicts: # baseapp/baseapp.go # baseapp/baseapp_test.go # examples/democoin/x/oracle/keeper_keys.go # examples/democoin/x/oracle/oracle_test.go # store/rootmultistore.go # types/lib/linear.go # types/lib/linear_test.go # x/auth/account_test.go # x/auth/mapper.go # x/gov/handler.go # x/ibc/mapper.go # x/params/keeper.go # x/params/keeper_test.go # x/slashing/signing_info.go # x/stake/keeper/keeper.go # x/stake/keeper/validator.go
Still waiting for approval on tendermint/go-amino#233 I think it makes sense to:
|
011f9a1
to
d306e8f
Compare
This can be merged as is (assuming there are no new merge conflicts) as soon as: |
Sadly there are now new merge conflicts. Let's include this with SDK release 0.26 (just blocked on Tendermint 0.26). |
- initially this was also renamed but we decided to do this in an incremental, two step approach (see discussion: tendermint/go-amino#222)
cf656b5
to
5fb1be1
Compare
Resolved the merge conflicts. Additionally, tendermint 0.26 will use amino 0.14.0, which (additionally to the renaming) encodes ints differently (varint / non-zigzag). Can test it with the sdk as soon as tm is released. |
5fb1be1
to
ea7355a
Compare
c6add6c
to
7b5467d
Compare
oops, I didn't see this. thank you ismail. |
Closing as the Tendermint 0.26 PR has been merged. |
These are the changes that will be necessary as soon as tendermint/go-amino#222 lands in a release and the sdk wants to catch up to the latest amino release.
(See discussion here: tendermint/go-amino#219)
I'll update this PR accordingly.
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: